<ul class="list-group list-group-flush">
    @foreach($replies as $reply)
        <li class="list-group-item d-flex align-items-center" id="reply{{$reply->id}}">
            <a href="{{route('users.show',$reply->user->id)}}" class="flex-shrink-0">
                @include('shared._avatar',['avatar'=>$reply->user->avatar,'width'=>50,'is_border'=>'hidden'])
            </a>
            <section class="flex-grow-1 px-2">
                <small class="text-secondary">
                    <span>
                        <i class="fa-regular fa-user"></i>
                        <a class="text-decoration-none"
                           href="{{route('users.show',$reply->user->id)}}">
                            {{$reply->user->name}}
                        </a>
                    </span>
                    <span>
                        &nbsp;
                        •
                         &nbsp;
                    </span>
                    <span>
                        <i class="fa-regular fa-clock"></i>
                        <span>{{$reply->created_at->diffForHumans()}}</span>
                    </span>
                </small>
                <div class="text-success">
                    {!! $reply->content !!}
                </div>
            </section>
            @can('destroy',$reply)
            <form action="{{route('replies.destroy',$reply->id)}}"
                  method="POST"
                  class="small text-secondary"
                  onsubmit="return confirm('您真的要删除该评论吗?')"
            >
                @csrf
                {{method_field('DELETE')}}
                <button type="submit" class="btn btn-default btn-sm">
                 <i class="fa-solid fa-trash-can text-secondary"></i>
                </button>
            </form>
            @endcan
        </li>
    @endforeach
</ul>
